//package com.retailcloud.searchservice.config;
//
//import org.apache.http.HttpHost;
//import org.elasticsearch.client.RequestOptions;
//import org.elasticsearch.client.RestClient;
//import org.elasticsearch.client.RestHighLevelClient;
//import org.springframework.boot.SpringBootConfiguration;
//import org.springframework.context.annotation.Bean;
//
//
///**
// * @author wudi
// * @date 2024/9/27
// * @comment
// */
//@SpringBootConfiguration
//public class GuliMallElasticSearchConfig {
//    public static final RequestOptions COMMON_OPTIONS ;
//    static {
//        RequestOptions.Builder builder = RequestOptions.DEFAULT.toBuilder();
//        COMMON_OPTIONS = builder.build();
//    }
//
//
//    /**
//     * 导入依赖
//     *
//     */
//    @Bean
//    public RestHighLevelClient esRestClient(){
//
//        RestHighLevelClient client = null;
//        try {
//            client = new RestHighLevelClient(
//                    RestClient.builder(
//                            new HttpHost("10.211.55.22", 9200, "http"))
//            );
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//
//        return client;
//    }
//
//
//
//}
